﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UIFW;
using UnityEngine.UI;

public class WaitingUIForm : BaseUIForm{

    public Text[] texts;
    
    public void Awake()
    {
        CurrentUIType.uiShowMode = UIShowMode.HideOther;
        var tmp = Resources.LoadAll<TextAsset>("Introduction");
        var tmp2 = tmp[Random.Range(0, tmp.Length)];
        string[] resourceText = (tmp2.name + "$" + tmp2.text).Split('$');
        for (int i = 0; i < texts.Length; i++)
            texts[i].text = resourceText[i];
        GameObject.Find(tmp2.name).GetComponent<Image>().enabled = true;
    }

    public void OnEnable()
    {
    }
}
